package main;

import java.util.ArrayList;
import java.util.List;

public class ObservableMixin implements Observable {
	
	private List<Observer> observers = new ArrayList<Observer>();

	@Override
	public void addObserver(Observer observer) {
		observers.add(observer);
	}

	@Override
	public void removeObserver(Observer observer) {
		observers.remove(observer);
	}

	@Override
	public void notifyObservers(Object arg) {
		for(Observer observer : observers) {
			observer.update(arg);
		}

	}

}
